package com.tiny.work.biz.dao;

import com.tiny.work.biz.entity.TbWatchPosition;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TbWatchPositionMapper {
    @Select("SELECT * FROM tb_watch_position " +
            "WHERE watch_id=#{watch_id}  " +
//            "WHERE gmt_create >= #{start} " +
//            "AND gmt_create <= #{end} " +
//            "AND watch_id=#{watchId} " +
            "ORDER BY gmt_create"
    )
    @Results(value={
            @Result(property="id", column ="id" ),
            @Result(property="watchId", column = "watch_id")
    })
    List<TbWatchPosition> findPathsByWatchId(
            @Param("watch_id") Long watch_id);

}
